<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="include :: header"></head>
<body class="hold-transition skin-blue sidebar-mini">
<section class="content">
    <button class="btn btn-info pull-right" onclick="Print('#print')">打印</button>
    <div class="row" style="margin-top: 64px">
        <div class="col-xs-10 col-xs-offset-1">
            <div id="print">
                <table class="t1" id="t1">
                    <thead style="display: table-header-group">
                    <tr>
                        <td colspan="12">
                            <img th:src="@{/img/logo3.jpg}" width="64px" height="40px" style="margin-top: -30px">
                            <div style="display: inline-block;margin-top: 5px;margin-left: 20px">
                                <span style="letter-spacing: 24px;display: block;line-height: 20px">&nbsp;辽宁忠旺机械设备制造有限公司</span>
                                <span style="display: block;font-size: 12px;line-height: 20px">Liaoning Zhongwang Machinery Equipment Manufacturing Co., Ltd</span>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="12" style="font-size: 16px;letter-spacing: 4px;">
                            涂装设计清单
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 6%">项目编号</td>
                        <td style="width: 11%;font-size: 14px;">
                            [[${dsnCoatSheet.proCode}]]
                        </td>
                        <td style="width: 6%">项目名称</td>
                        <td colspan="3">
                            [[${dsnCoatSheet.proName}]]
                        </td>
                        <td style="width: 9%">项目数量</td>
                        <td style="width: 7%">
                            [[${dsnCoatSheet.proNum}]]
                        </td>
                        <td style="width: 5%">类型</td>
                        <td style="width: 9%">
                            [[${dsnCoatSheet.special}]]
                        </td>
                        <td style="width: 5%">部分</td>
                        <td style="width: 10%">
                            [[${dsnCoatSheet.proPart}]]
                        </td>
                    </tr>
                    <tr>
                        <td>序号</td>
                        <td colspan="2">图号</td>
                        <td style="width: 11%">图名</td>
                        <td style="width: 5%">数量</td>
                        <td style="width: 12%">底漆颜色</td>
                        <td style="width: 9%">底漆面积<br>(mm²)</td>
                        <td colspan="2">面漆颜色</td>
                        <td>面漆面积<br>(mm²)</td>
                        <td colspan="2">备注</td>
                    </tr>
                    </thead>
                    <tbody id="out">
                    <tr th:each="coatDetail : ${coatDetails}">
                        <td th:text="${coatDetailStat.count}"></td>
                        <td colspan="2">
                            [[${coatDetail.drawNo}]]
                        </td>
                        <td>
                            [[${coatDetail.drawName}]]
                        </td>
                        <td>
                            <input th:value="${T(com.zw.mes.util.BigDecimalUtils).valueFormat(coatDetail.num)}"
                                   style="background-color: white" disabled="disabled">
                        </td>
                        <td>
                            [[${coatDetail.primerColor}]]
                        </td>
                        <td>
                            [[${coatDetail.primerArea}]]
                        </td>
                        <td colspan="2">
                            [[${coatDetail.topcoatColor}]]
                        </td>
                        <td>
                            [[${coatDetail.topcoatArea}]]
                        </td>
                        <td colspan="2">
                            [[${coatDetail.remark}]]
                        </td>
                    </tr>
                    <tr>
                        <td>技术要求</td>
                        <td colspan="11" style="text-align:left;padding-left: 5px;">
                            <div th:utext="${dsnCoatSheet.require}"></div>
                        </td>
                    </tr>
                    </tbody>
                </table>
                <div class="row" style="font-size: 14px;line-height: 200%;">
                    <div class="col-xs-3" style="padding-left: 0">提报人：[[${dsnCoatSheet.createName}]]&nbsp;&nbsp;[[${#dates.format(dsnCoatSheet.createTime,'yyyy.MM.dd')}]]</div>
                    <div class="col-xs-3">联系电话：[[${dsnCoatSheet.createTel}]]</div>
                    <div class="col-xs-3">审核：<span>[[${dsnCoatSheet.reviewer}]]&nbsp;&nbsp;[[${#dates.format(dsnCoatSheet.rTime,'yyyy.MM.dd')}]]</span></div>
                    <div class="col-xs-3">批准：<span>[[${dsnCoatSheet.approval}]]&nbsp;&nbsp;[[${#dates.format(dsnCoatSheet.aTime,'yyyy.MM.dd')}]]</span></div>
                </div>
            </div>
        </div>
        <div class="col-xs-1">
            <table id="t2" class="t2">
                <thead style="display: table-header-group">
                <tr><td></td></tr>
                <tr><td></td></tr>
                <tr><td></td></tr>
                <tr><td></td></tr>
                </thead>
                <tbody>
                <tr th:each="coatDetail : ${coatDetails}">
                    <td style="text-align: left">
                        <a target="_blank" style="margin-left: -10px" th:if="${coatDetail.url != null}"
                           th:href="@{'/painting/downloadProjectFileCoat/'+${coatDetail.id}}"   >附件</a>
                        <span th:if="${coatDetail.url == null}">&nbsp;</span>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</section>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
    $(function () {
        $("#t1 tr").each(function (i,v) {
            $("#t2 tr").eq(i).find("td").first().height($(this).find("td:first").height());
        })
    });
</script>
</body>
</html>
